import { ref, computed } from 'vue'
import { defineStore } from 'pinia'  //小仓库总经理
                //使用和计数相关的store     //和
export const useCounterStore = defineStore('counter', () => {
  
  const count = ref(0)
  const doubleCount = computed(() => count.value * 2)


  function increment() {
    count.value++
  }

  return { count, doubleCount, increment }
})
